<%@page import="java.util.Date"%>
<%@page import="wstrader.util.Common"%>
<option value="<%=new java.sql.Date(0)%>" selected>All</option>
<%								  
    rs = task.getContractLsDt();
	int dloopno=0;
	String StrCDt ="";
    while (rs.next())
	{
		//java.sql.Date date = rs.getDate("last_date");
		java.sql.Date ChkDt = Utils.strToDate("01-" + Utils.dateToStr(rs.getDate("last_date")).substring(3));
                int month = Common.getMonth(Utils.dateToStr(rs.getDate("last_date")).substring(3,6));
                float year_month = Float.parseFloat(Utils.dateToStr(rs.getDate("last_date")).substring(8,9) + "." + month);
                int cur_month = Common.getMonth(Utils.dateToStr(new Date()).substring(3,6));
                float cur_year_month = Float.parseFloat(Utils.dateToStr(new Date()).substring(8,9) + "." + cur_month);
                if (year_month >= cur_year_month){
                    ChkDt = Utils.nextMonth(ChkDt); 
                    java.sql.Date date = rs.getDate("last_date");		
                    if (StrCDt.compareTo(Utils.dateToStr(rs.getDate("last_date")).substring(3))!= 0)
                    {
                    
%>		
			<option value="<%=ChkDt%>"><%=Utils.dateToStr(date).substring(3)%></option>
<%
			StrCDt= Utils.dateToStr(rs.getDate("last_date")).substring(3);
			dloopno=dloopno+1;
                    }
                }
	}
	rs.close();
	//task.getResponse().setSelected("ls_date");
	task.getResponse().setSelected("ls_date",""+task.getRequest().getValueDate("ls_date"));
%>	
